package com.shadow.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * Created by qq65827 on 2015/1/26.
 */
@Entity
public class User extends BaseObject {

    public User() {

    }

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }
    /**
     * 默认图片
     */
    public static final String defaultPhotoPath = "default.png";

    /**
     * 男
     */
    public static final String MALE = "M";
    /**
     * 女
     */
    public static final String FEMALE = "F";


    @NotNull(message = "用户名不能为空")
    public String username;

    @NotNull(message = "密码不能为空")
    public String password;

    public String email;

    private String realName;

    private String photoPath = defaultPhotoPath;

    private int age;

    @Column(length = 5)
    private String gender = MALE;

    private Date birthDate;


    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getPhotoPath() {
        return photoPath;
    }

    public void setPhotoPath(String photoPath) {
        this.photoPath = photoPath;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }





}
